home *** CD-ROM | disk | FTP | other *** search
/ New Perspectives on Computer Concepts / New Perspectives on Computer Concepts.iso / np2010c / F1251.ECS < prev    next >
Text File  |  2008-11-19  |  8KB  |  248 lines

  1. |COPYRIGHT 2006 BY MEDIATECHNICS CORPORATION|HEADER|3|Prolog Input|0|F1251.FLC|0|0|0|0|0|0|
  2. |***|
  3. |1|1|1|1|0|0|
  4. |OPEN3.MID||0|0|1||0|
  5. ||0|0|0|0|F1251.BMP|5900|6475|4|1|
  6. |1|0|0|0|0|1|1|0|0|0|0|1|1|0|0|0|0|1|1|0|0|0|0|1|0|0|0|0|
  7. |0|0|1|0|0|1|0|0|1|0|0|1|
  8. |***|
  9. |2|1|1|1|0|0|
  10. |||0|0|0||1|
  11. ||10|10|10|10||0|0|0|0|
  12. |1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|10|10|10|10|
  13. |0|0|1|0|0|1|0|0|1|0|0|1|
  14. |***|
  15. |3|1|1|45|0|0|
  16. |F125101.WAV||0|0|1||1|
  17. |In the completed pizza program, the Betterdeal rule collects input for pizza prices, sizes, and shapes.  It then uses the input to calculate each pizza's price per square inch so it can tell you which pizza is the better deal.|3345|3585|1860|3270||0|0|0|0|
  18. |1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|10|10|10|10|
  19. |0|0|1|0|0|1|0|0|1|0|0|1|
  20. |***|
  21. |4|1|1|1|0|0|
  22. |||0|0|0||1|
  23. ||10|10|10|10||0|0|0|0|
  24. |1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|10|10|10|10|
  25. |0|0|1|0|0|1|0|0|1|0|0|1|
  26. |***|
  27. |5|2|1|1|0|0|
  28. |||0|0|0||1|
  29. ||10|10|10|10||0|0|0|0|
  30. |1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|10|10|10|10|
  31. |0|0|1|0|0|1|0|0|1|0|0|1|
  32. |***|
  33. |6|2|1|15|0|0|
  34. |F125102.WAV||0|0|1||1|
  35. |Let's begin by consulting the completed pizza program.|4390|3240|600|2625||0|0|1|0|
  36. |1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|10|10|10|10|
  37. |0|0|1|0|0|1|0|0|1|0|0|1|
  38. |***|
  39. |7|2|1|1|0|0|
  40. |||0|0|0||1|
  41. ||10|10|10|10||0|0|1|0|
  42. |1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|10|10|10|10|
  43. |0|0|1|0|0|1|0|0|1|0|0|1|
  44. |***|
  45. |8|3|1|1|0|0|
  46. |||0|0|0||1|
  47. ||10|10|10|10||0|0|0|0|
  48. |1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|10|10|10|10|
  49. |0|0|1|0|0|1|0|0|1|0|0|1|
  50. |***|
  51. |9|4|1|1|0|0|
  52. |||0|0|0||1|
  53. ||10|10|10|10||0|0|0|0|
  54. |1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|10|10|10|10|
  55. |0|0|1|0|0|1|0|0|1|0|0|1|
  56. |***|
  57. |10|4|1|15|0|0|
  58. |F125103.WAV||0|0|1||1|
  59. |Prolog compiles the program and waits for a query.|1765|4305|675|2730||0|0|1|0|
  60. |1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|10|10|10|10|
  61. |0|0|1|0|0|1|0|0|1|0|0|1|
  62. |***|
  63. |11|4|1|1|0|0|
  64. |||0|0|0||1|
  65. ||10|10|10|10||0|0|1|0|
  66. |1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|10|10|10|10|
  67. |0|0|1|0|0|1|0|0|1|0|0|1|
  68. |***|
  69. |12|5|1|1|0|0|
  70. |||0|0|0||1|
  71. ||10|10|10|10||0|0|1|0|
  72. |1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|10|10|10|10|
  73. |0|0|1|0|0|1|0|0|1|0|0|1|
  74. |***|
  75. |13|5|1|15|0|0|
  76. |F125104.WAV||0|0|1||1|
  77. |We want to know if pizza1 is a better deal than pizza2.|5320|4305|675|2625||0|0|1|0|
  78. |1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|10|10|10|10|
  79. |0|0|1|0|0|1|0|0|1|0|0|1|
  80. |***|
  81. |14|5|1|1|0|0|
  82. |||0|0|0||1|
  83. ||10|10|10|10||0|0|1|0|
  84. |1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|10|10|10|10|
  85. |0|0|1|0|0|1|0|0|1|0|0|1|
  86. |***|
  87. |15|6|1|1|0|0|
  88. |||0|0|0||1|
  89. ||10|10|10|10||0|0|1|0|
  90. |1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|10|10|10|10|
  91. |0|0|1|0|0|1|0|0|1|0|0|1|
  92. |***|
  93. |16|6|1|15|0|0|
  94. |F125105.WAV||0|0|1||1|
  95. |The program uses a write command to display the first prompt.|4270|4710|870|2400||0|0|1|0|
  96. |1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|10|10|10|10|
  97. |0|0|1|0|0|1|0|0|1|0|0|1|
  98. |***|
  99. |17|6|1|1|0|0|
  100. |||0|0|0||1|
  101. ||10|10|10|10||0|0|1|0|
  102. |1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|10|10|10|10|
  103. |0|0|1|0|0|1|0|0|1|0|0|1|
  104. |***|
  105. |18|7|1|1|0|0|
  106. |||0|0|0||1|
  107. ||10|10|10|10||0|0|1|0|
  108. |1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|10|10|10|10|
  109. |0|0|1|0|0|1|0|0|1|0|0|1|
  110. |***|
  111. |19|7|1|20|0|0|
  112. |F125106.WAV||0|0|1||1|
  113. |We'll enter 10 as the price of the first pizza, then press the Enter key.|4900|4695|870|2445||0|0|1|0|
  114. |1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|10|10|10|10|
  115. |0|0|1|0|0|1|0|0|1|0|0|1|
  116. |***|
  117. |20|7|1|1|0|0|
  118. |||0|0|0||1|
  119. ||10|10|10|10||0|0|1|0|
  120. |1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|10|10|10|10|
  121. |0|0|1|0|0|1|0|0|1|0|0|1|
  122. |***|
  123. |21|8|1|1|0|0|
  124. |||0|0|0||1|
  125. ||10|10|10|10||0|0|1|0|
  126. |1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|10|10|10|10|
  127. |0|0|1|0|0|1|0|0|1|0|0|1|
  128. |***|
  129. |22|8|1|20|0|0|
  130. |F125107.WAV||0|0|1||1|
  131. |In response to the second prompt, we'll enter 12 as the size of the first pizza.|4165|5085|870|2595||0|0|1|0|
  132. |1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|10|10|10|10|
  133. |0|0|1|0|0|1|0|0|1|0|0|1|
  134. |***|
  135. |23|8|1|1|0|0|
  136. |||0|0|0||1|
  137. ||10|10|10|10||0|0|1|0|
  138. |1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|10|10|10|10|
  139. |0|0|1|0|0|1|0|0|1|0|0|1|
  140. |***|
  141. |24|9|1|1|0|0|
  142. |||0|0|0||1|
  143. ||10|10|10|10||0|0|1|0|
  144. |1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|10|10|10|10|
  145. |0|0|1|0|0|1|0|0|1|0|0|1|
  146. |***|
  147. |25|10|1|15|0|0|
  148. |F125108.WAV||0|0|1||1|
  149. |Let's suppose that the first pizza is square.|4390|5445|660|2085||0|0|1|0|
  150. |1|6000|4920|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|10|10|10|10|
  151. |0|0|1|0|0|1|0|0|1|0|0|1|
  152. |***|
  153. |26|10|1|1|0|0|
  154. |||0|0|0||1|
  155. ||10|10|10|10||0|0|1|0|
  156. |1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|10|10|10|10|
  157. |0|0|1|0|0|1|0|0|1|0|0|1|
  158. |***|
  159. |27|11|1|1|0|0|
  160. |||0|0|0||1|
  161. ||10|10|10|10||0|0|0|0|
  162. |1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|10|10|10|10|
  163. |0|0|1|0|0|1|0|0|1|0|0|1|
  164. |***|
  165. |28|12|1|1|0|0|
  166. |||0|0|0||1|
  167. ||10|10|10|10||0|0|0|0|
  168. |1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|10|10|10|10|
  169. |0|0|1|0|0|1|0|0|1|0|0|1|
  170. |***|
  171. |29|12|1|15|0|0|
  172. |F125109.WAV||0|0|1||1|
  173. |We'll respond to the prompts for the second pizza.|4360|5805|660|2580||0|0|1|0|
  174. |1|8565|5460|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|10|10|10|10|
  175. |0|0|1|0|0|1|0|0|1|0|0|1|
  176. |***|
  177. |30|12|1|1|0|0|
  178. |||0|0|0||1|
  179. ||10|10|10|10||0|0|1|0|
  180. |1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|10|10|10|10|
  181. |0|0|1|0|0|1|0|0|1|0|0|1|
  182. |***|
  183. |31|13|1|1|0|0|
  184. |||0|0|0||1|
  185. ||10|10|10|10||0|0|0|0|
  186. |1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|10|10|10|10|
  187. |0|0|1|0|0|1|0|0|1|0|0|1|
  188. |***|
  189. |32|14|1|1|0|0|
  190. |||0|0|0||1|
  191. ||10|10|10|10||0|0|0|0|
  192. |1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|10|10|10|10|
  193. |0|0|1|0|0|1|0|0|1|0|0|1|
  194. |***|
  195. |33|15|1|1|0|0|
  196. |||0|0|0||1|
  197. ||10|10|10|10||0|0|0|0|
  198. |1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|10|10|10|10|
  199. |0|0|1|0|0|1|0|0|1|0|0|1|
  200. |***|
  201. |34|16|1|1|0|0|
  202. |||0|0|0||1|
  203. ||10|10|10|10||0|0|0|0|
  204. |1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|10|10|10|10|
  205. |0|0|1|0|0|1|0|0|1|0|0|1|
  206. |***|
  207. |35|17|1|1|0|0|
  208. |||0|0|0||1|
  209. ||10|10|10|10||0|0|0|0|
  210. |1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|10|10|10|10|
  211. |0|0|1|0|0|1|0|0|1|0|0|1|
  212. |***|
  213. |36|17|1|25|0|0|
  214. |F125110.WAV||0|0|1||1|
  215. |When the data for both pizzas has been entered, Prolog evaluates the rest of the rules to determine if pizza1 is a better deal than pizza2.|5485|6555|1185|3270||0|0|1|0|
  216. |1|9120|5985|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|10|10|10|10|
  217. |0|0|1|0|0|1|0|0|1|0|0|1|
  218. |***|
  219. |37|17|1|1|0|0|
  220. |||0|0|0||1|
  221. ||10|10|10|10||0|0|1|0|
  222. |1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|10|10|10|10|
  223. |0|0|1|0|0|1|0|0|1|0|0|1|
  224. |***|
  225. |38|19|1|1|0|0|
  226. |||0|0|0||1|
  227. ||10|10|10|10||0|0|1|0|
  228. |1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|10|10|10|10|
  229. |0|0|1|0|0|1|0|0|1|0|0|1|
  230. |***|
  231. |39|19|1|25|0|0|
  232. |F125111.WAV||0|0|1||1|
  233. |Prolog responds with "Yes" to indicate that pizza1 is a better deal than pizza2.|1990|7170|915|2820||0|0|1|0|
  234. |1|6450|1320|15|15|1|1|10|10|10|10|1|1|1170|7200|15|15|1|1|10|10|10|10|1|10|10|10|10|
  235. |0|0|1|0|0|1|0|0|1|0|0|1|
  236. |***|
  237. |40|19|1|1|0|0|
  238. |||0|0|0||1|
  239. ||10|10|10|10||0|0|0|0|
  240. |1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|10|10|10|10|
  241. |0|0|1|0|0|1|0|0|1|0|0|1|
  242. |***|
  243. |41|19|1|1|0|0|
  244. |CLOSE3.MID||0|0|1||1|
  245. ||10|10|10|10|ANEND.BMP|4500|6975|4|1|
  246. |1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|1|10|10|10|10|1|10|10|10|10|
  247. |0|0|1|0|0|1|0|0|1|0|0|1|
  248.